﻿using System;

namespace Program21
{
    class Program
    {
        public delegate string DelProStr(string str);
        static void Main(string[] args)
        {
            //三个需求
            //将所有元素转换成大写
            //将所有元素转换成小写
            //用委托来实现
            string[] names = { "abcdDE", "DEdfsEFDd", "ASFdf" };
            Lower(names);
            Uper(names);
           
           
        }
        private static void ProString(string []names ,DelProStr del)
        {
            for(var i=0;i<names.Length;i++)
            {
                //转入一个处理方式
                names[i] = del(names[i]);
               
            }
        }
        private static void Lower(string[] names)
        {
            Console.WriteLine("abcdde", "dedfsefefdd", "asfdf");
        }
        private static void Uper(string[] names)
        {
            Console.WriteLine("ABCDDE", "DEDFSEFEFDD", "ASFDF");
        }
    }
}
